package com.xinghou.platform.server.api.controller;

import com.xinghou.platform.entity.req.UserRegistReq;
import com.xinghou.platform.entity.resp.UserInfoResp;
import com.xinghou.platform.model.main.DataConfig;
import com.xinghou.platform.model.main.InterestTagsConfig;
import com.xinghou.platform.server.api.bussiness.InterestTagsConfigService;
import com.xinghou.platform.server.api.log.LoggerFactory;
import com.xinghou.platform.util.JsonUtil;
import com.xinghou.platform.util.SignUtil;
import com.xinghou.platform.util.StringUtils;
import com.xinghou.platform.util.exception.DBExceptionEnums;
import com.xinghou.platform.util.exception.ServiceException;
import com.xinghou.platform.server.api.log.ApiLogger;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by qingshengzheng on 16/6/28.
 */
@Controller
public class InterestConfigController extends BaseControl {

    @Resource
    private InterestTagsConfigService interestTagsConfigService;

    @ResponseBody
    @SuppressWarnings({"unchecked", "rawtypes", "static-access"})
    @RequestMapping(value = "/findAllInterestConfigs", method = {RequestMethod.POST})
    public String findAllInterestConfigs(
                                 HttpServletRequest request, HttpServletResponse response) {
        Map<String, String> requestContent = new HashMap<String, String>();
        List<DataConfig> configs=interestTagsConfigService.getInterestTags(1);
        return response(configs);
    }
}
